define(['hr.common'], function(common){
    return {
        deleteDataById: deleteDataById,
        saveData: saveData,
        findAll: findAll
    };

    /**
     * 查找所有
     * @param params url中的参数，key=value&key=value
     * @param data http body
     */
    function findAll(params, data) {
        var url = '/hosLog/findAll';
        if(params) {
            url += '?' + params;
        }
        var p = {
            url: url,
            jsonParam: data
        };
        return common.loadAjax(p);
    }

    /**
     * 确认提交
     * @param data http body
     */
    function saveData(data){
        var p = {
            url: '/hosLog/saveData',
            jsonParam: data
        };
        return common.loadAjax(p);
    }

    /**
     * 删除方法
     */
    function deleteDataById(id){
        var p = {
            url: '/hosLog/deleteDataById/' + id
        };
        return common.loadAjax(p);
    }
});